The invention relates to a method for determining filter masks for relevance testing of identifiers which are able to be transmitted by way of a communication network in messages to a communication means, comprising the following steps:
determining relevance identifiers relevant for the communication means, and
determining irrelevance identifiers irrelevant for the communication means.
Moreover, the invention relates to such a generating module.
In communication networks messages are frequently transmitted to numerous destination communication means in so-called broadcast methods. The receiving destination communication means must therefore determine whether a message is relevant for them using an identifier contained in the respective message, generally binarily encoded, as for example a destination and/or source address, for the content of the message. Typical examples of this are bus systems in which the bus participants all receive messages transmitted by way of a bus.
In order to free the principal functional groups of a communication means, for example its central processor and/or central process or processes from filtering assignments, more particularly in the case of bus systems test means for the relevance testing of identifiers are provided in their transmitting and receiving modules which are responsible for transmission and reception of the messages, and such test means test the incoming identifiers using filter masks to determine or find their relevance. If such an identifier stands up to a comparison with one of the filter masks, that is to say it is a question of relevance identifier, the respective message is passed on to the principal functional group of the communication means but otherwise rejected. Test means, which are preferably realized by hardware or hardware-like software, are for example provided in transmission and reception modules for controller area network (CAN) buses, i. e. as CAN controllers. However, they may also be employed in a software process responsible for transmission and reception.
However, the number of the memory locations provided in a transmitting and receiving module is limited so that it is not possible to install a respective filter mask, for instance a binary code identical to them, for each relevance identifier. Furthermore, the test task becomes involved, if a long list of filter masks has to be gone through for testing one identifier.
It would be possible to combine several filter masks together as a combination filter masks, which is passable by several relevance identifiers associated with the respective initial filter masks. Those positions at which the respective initial filter masks differ, are marked as free positions or xe2x80x9cdon""t carexe2x80x9d positions in the case of a combination filter mask made up of such filter masks. However, combination filter masks with free positions are frequently able to be passed by (i.e. are transparent to) irrelevance identifiers so that messages, which are irrelevant for the respective communication means, must be processed by the principal functional component group thereof.
One object of the invention is to determine a minimized number of filter masks for relevance testing of identifiers, which may be transmitted to a communication means by way of a communication network in messages.
A further object of the invention is to ensure that using the filter masks the irrelevant identifiers may be filtered out by the filter masks in a optimum manner.
In order to achieve these and/or other objects appearing from the present specification, claims and drawings, in the present initially mentioned method the following steps are provided for:
determining at least one initial filter mask in each case for each relevance identifier, which is not passable for the respective relevance identifier and is not passable for the irrelevance identifier,
combining at least two initial filter masks as a combination filter mask, which is passable for the respective relevance identifier associated with the respective initial filter masks, and
testing the combination filter mask, same being retained instead of its respective basic initial filter masks, if all irrelevance identifiers are able to be masked with the combination filter mask or being rejected, it is passable for at least one irrelevance identifier.
For achieving the object of the invention a generating module is also provided, which is provided with means for performing the steps.
The combination filter mask is no longer determined and employed in a more or less random manner, and is now determined on the basis of systematic combination of initial filter masks and testing of the respectively produced combination filter mask as regards non-passability for the irrelevance identifiers so that the irrelevance identifiers are able to be filtered out not only by the initial filter masks, but also by the combination filter mask in an optimum manner.
Further advantageous developments of the invention are defined in the claims.
It is an advantage for combination filter masks to be formed from initial filter masks and/or combination filter masks and to be retained or rejected following testing with the irrelevance identifiers until at least one predetermined interrupt criterion is reached, and more particularly until no further combination filter mask can be produced, which is unpassable for all irrelevance identifiers or until the number or, respectively, sum of combination filter masks and of initial filter masks not replaced by such combination filter masks has reached a predetermined value. The number of the combination filter masks and of the initial filter masks not replaced by them is accordingly minimized.
To the extent that for instance a desired number of the combination filter masks and of initial filter masks not replaced by such combination filter masks can not be reached, that is to say no (further) combination filter mask can be formed, which is not passable for all irrelevance identifiers, there is a provision such that at least one combination filter mask is formed from the initial filter masks and/or the combination filter masks and is retained instead of same, which is passable for at least one irrelevance identifier.
In keeping with such an advantageous form of the invention in the case of a selection of at least two combination filter masks, which are formed from initial filter masks and/or combination filter masks and are passable for at least one irrelevance identifier, that combination filter mask is selected and retained, which is passable for a smaller number of irrelevance identifiers and/or is passable for those irrelevance identifiers, which are transmitted with a lower frequency of occurrence probability in the communication network. Thus the impairment of a communication system is minimized, which would otherwise be caused by an undesired transparency for one or more irrelevance identifiers.
It is convenient for the combination filter masks to be passable for at least one irrelevance identifier only to be formed and retained until the sum of combination filter masks and of initial filter masks not replaced by such combination filter masks reaches a predetermined value. Therefore only as many combination filter masks passable for irrelevance identifiers are formed as is absolutely necessary.
It is an advantage in the case of a particularly preferred form of the invention to have a provision such that the initial filter masks are made into a grouped sequence, that the filter masks of the sequence are respectively combined with the respectively following filter masks in the sequence to give respective combination filter masks and the respective combination filter mask in lieu of the filter mask on which they are based is retained, it is not passable for all irrelevance identifiers. In principle other methods of proceeding are however possible, for example one in which the combination filter masks are formed from randomly selected initial filter masks.
In the case of the step by step combination of the filter masks of the sequence with the next following filter masks in the sequence there is an advantageous provision such that prior to the formation of the combination filter masks the initial order of the initial filter masks in the sequence is changed and that in the case of a selection of different initial orders an initial order is selected in accordance with a predetermined criterion and more particularly on the basis of the total number obtainable on the basis of the respective initial order of respective combination filter masks and of initial filter masks not replaced by such combination filter masks. In this case optimum filter masks are determined in a particularly systematic fashion.
It is not only the number of memory locations provided for the storage of filter masks, but furthermore the size of the individual memory locations which may be. For instance, typical identifiers in a CAN system are 11 bits long, whereas memory locations made available by CAN controllers (also named register locations) are frequently only designed for 8 bits. Although it would be possible to divide up a filter mask and share it between two register locations so that an 11 bit filter mask is able to be completely stored, the number of storable filter masks would then be halved.
For the optimum use of memory location capacity present there is therefore a provision such that the initial filter masks are masked using an initial mask to yield masked initial filter masks, a masked initial filter mask having several relevance identifiers for it and may be passable for them, and a masked initial filter mask is passable for one or more irrelevance identifiers, and for determining the combination filter masks the masked initial filter masks are employed and for testing the combination filter masks for unpassability of the combination filter masks preferably only those irrelevance identifiers are utilized, which on the basis of the masked initial filter masks, forming the basis of the respective combination filter mask, may be filtered out.
It will be clear that instead of masking with the initial mask, for example a right and/or left shift operation is possible, in the case of which for instance lowest value bits or, respectively, highest value bits of an identifier or of a filter mask are eliminated. In any case, the method in accordance with the invention and the convenient forms thereof are just as applicable to the masked initial filter mask and the combination filter mask determined therefrom as to the unmasked initial filter masks. Preferably, for testing the (masked) combination filter masks irrelevance identifiers masked with the initial mask are employed.
A masked initial filter mask can be passable for one or more irrelevance identifiers. If a combination filter mask is formed on the basis of such an initial filter mask, it will not be suitable for filtering out such relevance identifiers. Accordingly there is preferably a provision such that the combination filter mask is not tested with such irrelevance identifiers, which are already able to pass the initial filter mask forming the basis thereof.
There is preferably a provision such that the respective irrelevance identifiers masked with the initial mask are employed for testing a respective combination filter mask as regards unpassability. To the extent that the combination filter masks are tested as regards passability with reference to the relevance identifiers, it is also convenient for same, masked with the initial mask, to be employed for the above mentioned testing. In any case preferably on the basis of irrelevance identifiers, which are equivalent on the basis of the masking with the initial mask, only one is employed for testing the respective combination filter mask for unpassability or respectively in the case of one masked as being equivalent, only one respective relevance identifiers is used for testing the respective combination filter mask for passability. For instance, two identifiers are equal, if when unmasked they differ as regards their lowest value bit, but such bit is dropped on masking. In any case in this manner repetitions during testing of a filter mask are avoided.
Although in principle it is possible for the combination filter masks, and possibly retained initial filter mask, directly after determining them in accordance with the invention to be available for a communication means, there is preferably however a provision such that the combination filter masks and retained initial filter masks are sorted in accordance with at least one predetermined criterion and made available for the communication means. Such a criterion is for example the frequency of occurrence probability, in accordance with which the relevance identifiers associated with the respective combination filter masks or respectively initial filter masks are transmitted in the communication network. The communication means is therefore able to determine the relevance identifiers significant for it extremely rapidly, because same may be determined with the filter masks or masks at the start of the filter mask list.
As already indicated in the above mentioned examples, the irrelevance identifiers, the initial filter masks and the relevance identifiers are strings and more particularly binary strings and in each case have the same length. In this respect it is advantageous for the relevance identifiers and the initial filter masks associated with same firstly to be identical strings. It will be clear that other strings, as for example hexadecimal or alphanumeric strings are possible as identifiers and/or filter masks. Furthermore, an initial filter mask may even have several relevance identifiers allotted to it and for example have several so-called xe2x80x9cdon""t carexe2x80x9d digits or positions.
In principle the above mentioned identifiers may be any items in a respective message. Preferably however they will be address items, and more particularly destination and/or source address items, or serve as content identifiers for a message.
As a communication network in principle any broadcast network will come into question, in the case of which messages may be transmitted unspecifically and received by several recipients. However, it is more particularly advantageous to apply the invention to a bus system, more especially a controller area network (CAN) bus system or a local interconnect network (LIN) bus system.
In any case a communications means, as for example a CAN bus participant or a CAN interface component, also called a CAN controller, can be used to extremely rapidly and reliably determine the respectively irrelevant identifiers and to separate the respectively irrelevant irrelevance identifiers owing to the combination filter masks, which are formed by the method in accordance with the invention.
It will be clear that the method in accordance with the invention and the generating module of the invention may be employed xe2x80x9cofflinexe2x80x9d, in which case the identifiers are provided for the communication means using a separate development tool, as for instance a personal computer for implementing the generating module. The generating module can however also be run xe2x80x9conlinexe2x80x9d as well, as for instance by a communication participant, if during actual operation of a communication network, for instance a CAN bus, there is some change in the quantity and/or composition of the identifiers employed in the respective communication network and accordingly new and/or modified filter masks must be provided for the communication network.
Further advantageous developments and convenient forms of the invention will be understood from the following detailed descriptive disclosure of one embodiment thereof in conjunction with the accompanying drawings.